package neusoft.edu.cn.a215lmeordering.service;

import java.util.List;

import neusoft.edu.cn.a215lmeordering.bean.AddCart;
import neusoft.edu.cn.a215lmeordering.bean.CollectFood;
import neusoft.edu.cn.a215lmeordering.bean.CollectShop;
import neusoft.edu.cn.a215lmeordering.bean.CollectionList_Food;
import neusoft.edu.cn.a215lmeordering.bean.CollectionList_Shop;
import neusoft.edu.cn.a215lmeordering.bean.Content;
import neusoft.edu.cn.a215lmeordering.bean.Food;
import neusoft.edu.cn.a215lmeordering.bean.FoodDetails;
import neusoft.edu.cn.a215lmeordering.bean.IsCollect;
import neusoft.edu.cn.a215lmeordering.bean.Login;
import neusoft.edu.cn.a215lmeordering.bean.Person;
import neusoft.edu.cn.a215lmeordering.bean.Register;
import neusoft.edu.cn.a215lmeordering.bean.Shop;
import neusoft.edu.cn.a215lmeordering.bean.Update;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface AllService {

    @GET("userLogin.do")
    Call<Login> getLogin(@Query("username") String username, @Query("userpass") String password);

    @GET("userRegister.do")
    Call<Register> getRegister(@Query("username") String username, @Query("userpass") String password,
                               @Query("mobilenum") String mobilenum, @Query("address") String address,
                               @Query("comment") String comment);

    @GET("getAllShops.do")
    Call<List<Shop>> getShopList();

    @GET("getFoodByShop.do")
    Call<List<Food>> getFood(@Query("shop_id") int shop_id);

    @GET("getFoodById.do")
    Call<FoodDetails> getFoodDetails(@Query("food_id") int food_id);

    @GET("getAllUserCollection.do")
    Call<List<CollectionList_Food>> getUserCollectionFoodList(@Query("user_id") int user_id, @Query("flag") int flag);

    @GET("getAllUserCollection.do")
    Call<List<CollectionList_Shop>> getUserCollectionShopList(@Query("user_id") int user_id, @Query("flag") int flag);

    @GET("userCollectShop.do")
    Call<CollectShop> getUserCollectionShop(@Query("user_id") int user_id, @Query("shop_id") int shop_id);

    @GET("userCollectFood.do")
    Call<CollectFood> getUserCollectionFood(@Query("user_id") int user_id, @Query("food_id") int food_id);

    @GET("isCollected.do")
    Call<IsCollect> getUserIsCollect(@Query("user_id") int user_id, @Query("shop_food_id") int shop_food_id,
                                     @Query("flag") int flag);

    @GET("getFoodBySearch.do")
    Call<List<Food>> getFoodBySearch(@Query("search") String search);

    @GET("getUserById.do")
    Call<Person> getUser(@Query("user_id") int user_id);

    @GET("updateUserById.do")
    Call<Update> getUpdateUser(@Query("user_id") int user_id, @Query("username") String username,
                               @Query("userpass") String userpass, @Query("mobilenum") String mobilenum,
                               @Query("address") String address);

    @GET("getAllCommentsByFood.do")
    Call<List<Content>> getAllCotent(@Query("food_id") int food_id);

    @GET("addCart.do")
    Call<AddCart> getAddCart(@Query("user_id") int user_id, @Query("food_id") int food_id,
                             @Query("num") int num);



}
